import {
    observable,
    action
} from 'mobx';

class MainStore {
    @observable lists = [];
    @observable music = {};
    @observable selectedRowKeys = [];
    @observable fullTime = 0;
    @observable nowTime = 0;

    @action
    selectRow = (keys) => {
        this.selectedRowKeys = keys;
    }
    @action
    init = (response) => {
        this.lists = response.lists;
    }
    @action
    search = (response) => {
        this.lists = response.lists;
    }
    //双击选择播放歌曲
    @action
    selectMusic = (music) => {
        this.music = music;
    }
    //设置总时长
    @action
    setFullTime = (time) => {
        this.fullTime = time;
    }
    //设置已播放时长
    @action
    setNowTime = (time) => {
        this.nowTime = time;
    }

}

export default new MainStore();